import React from 'react';
import {Switch, Route} from 'react-router-dom';
import ReactLoading from 'shared/components/ReactLoading';

const Comparison = ReactLoading(() => import('pages/comparison'));
const TestCase = ReactLoading(() => import('pages/testcase'));
const Datasource = ReactLoading(() => import('pages/datasource'));


/* eslint-disable */
const routes = ({match}) =>
  <Switch>
    <Route path={`${match.path}comparison`} component={Comparison}/>
    <Route path={`${match.path}testcase`} component={TestCase}/>
    <Route path={`${match.path}datasource`} component={Datasource}/>
    <Route path={match.path} component={Datasource}/>
  </Switch>;

export default routes;
